package com.zsummer.demo.cloudseataservice2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.xml.ws.ServiceMode;

/**
 * @author zsummer
 * @since 2022/2/14
 */
@Service
public class StockService {

    @Autowired
    private StockDao stockDao;

    @Transactional
    public void deductStock(String productName, long orderCnt) {
        stockDao.deductStock(productName, orderCnt);
    }
}
